<html>
<#include "../common/header.ftl">

<body>
<div id="wrapper" class="toggled">

    <#--边栏sidebar-->
    <#include "../common/nav.ftl">

    <#--主要内容content-->
    <div id="page-content-wrapper">
        <div class="container-fluid" style="margin-left: 54px">
            <div class="row clearfix">
                <div class="col-md-6 column">
                    <form role="form" method="post" action="/sell/seller/product/save">
                        <#if  productInfo ?? >
                            <div class="form-group">
                                <label>商品id</label>
                                <input name="productId" type="number" class="form-control" readonly value="${(productInfo.productId)!''}"/>
                            </div>
                        </#if>
                        <div class="form-group">
                            <label>商品名称</label>
                            <input name="productName" type="text" required="required" class="form-control" value="${(productInfo.productName)!''}"/>
                        </div>
                        <div class="form-group">
                            <label>商品单价</label>
                            <input name="productPrice" type="number" class="form-control"  min=1 value="${(productInfo.productPrice?c)!''}"/>
                        </div>
                        <#if  productInfo ??>
                            <input type="number" hidden value="${productInfo.productStock?c}" name="productStock">
                        <#else>
                        <div class="form-group">
                            <label>库存</label>
                            <input name="productStock" type="number" class="form-control" required="required" min=1 value="${(productInfo.productStock?c)!''}"/>
                        </div>
                        </#if>
                        <div class="form-group">
                            <label>描述</label>
                            <input name="productDescription" type="text" class="form-control" required="required" value="${(productInfo.productDescription)!''}"/>
                        </div>
                        <div class="form-group">
                            <label>小图</label>
                            <input name="productIcon" type="text" class="form-control" required="required" value="${(productInfo.productIcon)!''}"/>
                        </div>
                        <button type="submit" class="btn btn-default primary">提交</button>
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>